package br.com.eventest.dao;

import java.util.List;

import javax.persistence.Query;

import br.com.eventest.model.Permissoe;
import br.com.eventest.model.Seguranca;

public class SegurancaDao extends GenericDao<Seguranca, Integer> {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	@SuppressWarnings("unchecked")
	public List<Permissoe> getPermissoes(Integer grupo){
		Query query = em.createNamedQuery("Permissoes.findPermissao");
		query.setParameter("grupo", grupo);
		List<Permissoe> resultList = query.getResultList();
		return resultList;
	}

}
